home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / rdf / nsIRDFXMLSink.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  12KB  |  374 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIRDFXMLSink.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIRDFXMLSink_h__
  6. #define __gen_nsIRDFXMLSink_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIAtom;
  18. class nsString;
  19. class nsIRDFXMLSink; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIRDFXMLSinkObserver */
  23. #define NS_IRDFXMLSINKOBSERVER_IID_STR "eb1a5d30-ab33-11d2-8ec6-00805f29f370"
  24.  
  25. #define NS_IRDFXMLSINKOBSERVER_IID \
  26.   {0xeb1a5d30, 0xab33, 0x11d2, \
  27.     { 0x8e, 0xc6, 0x00, 0x80, 0x5f, 0x29, 0xf3, 0x70 }}
  28.  
  29. /**
  30.  * An observer that is notified as progress is made on the load
  31.  * of an RDF/XML document in an <code>nsIRDFXMLSink</code>.
  32.  */
  33. class NS_NO_VTABLE nsIRDFXMLSinkObserver : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRDFXMLSINKOBSERVER_IID)
  37.  
  38.   /**
  39.      * Called when the load begins.
  40.      * @param aSink the RDF/XML sink on which the load is beginning.
  41.      */
  42.   /* void onBeginLoad (in nsIRDFXMLSink aSink); */
  43.   NS_IMETHOD OnBeginLoad(nsIRDFXMLSink *aSink) = 0;
  44.  
  45.   /**
  46.      * Called when the load is suspended (e.g., for network quantization).
  47.      * @param aSink the RDF/XML sink that is being interrupted.
  48.      */
  49.   /* void onInterrupt (in nsIRDFXMLSink aSink); */
  50.   NS_IMETHOD OnInterrupt(nsIRDFXMLSink *aSink) = 0;
  51.  
  52.   /**
  53.      * Called when a suspended load is resuming.
  54.      * @param aSink the RDF/XML sink that is resuming.
  55.      */
  56.   /* void onResume (in nsIRDFXMLSink aSink); */
  57.   NS_IMETHOD OnResume(nsIRDFXMLSink *aSink) = 0;
  58.  
  59.   /**
  60.      * Called when an RDF/XML load completes successfully.
  61.      * @param aSink the RDF/XML sink that has finished loading.
  62.      */
  63.   /* void onEndLoad (in nsIRDFXMLSink aSink); */
  64.   NS_IMETHOD OnEndLoad(nsIRDFXMLSink *aSink) = 0;
  65.  
  66.   /**
  67.      * Called when an error occurs during the load
  68.      * @param aSink the RDF/XML sink in which the error occurred
  69.      * @param aStatus the networking result code
  70.      * @param aErrorMsg an error message, if applicable
  71.      */
  72.   /* void onError (in nsIRDFXMLSink aSink, in nsresult aStatus, in wstring aErrorMsg); */
  73.   NS_IMETHOD OnError(nsIRDFXMLSink *aSink, nsresult aStatus, const PRUnichar *aErrorMsg) = 0;
  74.  
  75. };
  76.  
  77. /* Use this macro when declaring classes that implement this interface. */
  78. #define NS_DECL_NSIRDFXMLSINKOBSERVER \
  79.   NS_IMETHOD OnBeginLoad(nsIRDFXMLSink *aSink); \
  80.   NS_IMETHOD OnInterrupt(nsIRDFXMLSink *aSink); \
  81.   NS_IMETHOD OnResume(nsIRDFXMLSink *aSink); \
  82.   NS_IMETHOD OnEndLoad(nsIRDFXMLSink *aSink); \
  83.   NS_IMETHOD OnError(nsIRDFXMLSink *aSink, nsresult aStatus, const PRUnichar *aErrorMsg); 
  84.  
  85. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  86. #define NS_FORWARD_NSIRDFXMLSINKOBSERVER(_to) \
  87.   NS_IMETHOD OnBeginLoad(nsIRDFXMLSink *aSink) { return _to OnBeginLoad(aSink); } \
  88.   NS_IMETHOD OnInterrupt(nsIRDFXMLSink *aSink) { return _to OnInterrupt(aSink); } \
  89.   NS_IMETHOD OnResume(nsIRDFXMLSink *aSink) { return _to OnResume(aSink); } \
  90.   NS_IMETHOD OnEndLoad(nsIRDFXMLSink *aSink) { return _to OnEndLoad(aSink); } \
  91.   NS_IMETHOD OnError(nsIRDFXMLSink *aSink, nsresult aStatus, const PRUnichar *aErrorMsg) { return _to OnError(aSink, aStatus, aErrorMsg); } 
  92.  
  93. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  94. #define NS_FORWARD_SAFE_NSIRDFXMLSINKOBSERVER(_to) \
  95.   NS_IMETHOD OnBeginLoad(nsIRDFXMLSink *aSink) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnBeginLoad(aSink); } \
  96.   NS_IMETHOD OnInterrupt(nsIRDFXMLSink *aSink) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnInterrupt(aSink); } \
  97.   NS_IMETHOD OnResume(nsIRDFXMLSink *aSink) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnResume(aSink); } \
  98.   NS_IMETHOD OnEndLoad(nsIRDFXMLSink *aSink) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnEndLoad(aSink); } \
  99.   NS_IMETHOD OnError(nsIRDFXMLSink *aSink, nsresult aStatus, const PRUnichar *aErrorMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnError(aSink, aStatus, aErrorMsg); } 
  100.  
  101. #if 0
  102. /* Use the code below as a template for the implementation class for this interface. */
  103.  
  104. /* Header file */
  105. class nsRDFXMLSinkObserver : public nsIRDFXMLSinkObserver
  106. {
  107. public:
  108.   NS_DECL_ISUPPORTS
  109.   NS_DECL_NSIRDFXMLSINKOBSERVER
  110.  
  111.   nsRDFXMLSinkObserver();
  112.  
  113. private:
  114.   ~nsRDFXMLSinkObserver();
  115.  
  116. protected:
  117.   /* additional members */
  118. };
  119.  
  120. /* Implementation file */
  121. NS_IMPL_ISUPPORTS1(nsRDFXMLSinkObserver, nsIRDFXMLSinkObserver)
  122.  
  123. nsRDFXMLSinkObserver::nsRDFXMLSinkObserver()
  124. {
  125.   /* member initializers and constructor code */
  126. }
  127.  
  128. nsRDFXMLSinkObserver::~nsRDFXMLSinkObserver()
  129. {
  130.   /* destructor code */
  131. }
  132.  
  133. /* void onBeginLoad (in nsIRDFXMLSink aSink); */
  134. NS_IMETHODIMP nsRDFXMLSinkObserver::OnBeginLoad(nsIRDFXMLSink *aSink)
  135. {
  136.     return NS_ERROR_NOT_IMPLEMENTED;
  137. }
  138.  
  139. /* void onInterrupt (in nsIRDFXMLSink aSink); */
  140. NS_IMETHODIMP nsRDFXMLSinkObserver::OnInterrupt(nsIRDFXMLSink *aSink)
  141. {
  142.     return NS_ERROR_NOT_IMPLEMENTED;
  143. }
  144.  
  145. /* void onResume (in nsIRDFXMLSink aSink); */
  146. NS_IMETHODIMP nsRDFXMLSinkObserver::OnResume(nsIRDFXMLSink *aSink)
  147. {
  148.     return NS_ERROR_NOT_IMPLEMENTED;
  149. }
  150.  
  151. /* void onEndLoad (in nsIRDFXMLSink aSink); */
  152. NS_IMETHODIMP nsRDFXMLSinkObserver::OnEndLoad(nsIRDFXMLSink *aSink)
  153. {
  154.     return NS_ERROR_NOT_IMPLEMENTED;
  155. }
  156.  
  157. /* void onError (in nsIRDFXMLSink aSink, in nsresult aStatus, in wstring aErrorMsg); */
  158. NS_IMETHODIMP nsRDFXMLSinkObserver::OnError(nsIRDFXMLSink *aSink, nsresult aStatus, const PRUnichar *aErrorMsg)
  159. {
  160.     return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162.  
  163. /* End of implementation class template. */
  164. #endif
  165.  
  166.  
  167. /* starting interface:    nsIRDFXMLSink */
  168. #define NS_IRDFXMLSINK_IID_STR "eb1a5d31-ab33-11d2-8ec6-00805f29f370"
  169.  
  170. #define NS_IRDFXMLSINK_IID \
  171.   {0xeb1a5d31, 0xab33, 0x11d2, \
  172.     { 0x8e, 0xc6, 0x00, 0x80, 0x5f, 0x29, 0xf3, 0x70 }}
  173.  
  174. class NS_NO_VTABLE nsIRDFXMLSink : public nsISupports {
  175.  public: 
  176.  
  177.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRDFXMLSINK_IID)
  178.  
  179.   /**
  180.  * A "sink" that receives and processes RDF/XML. This interface is used
  181.  * by the RDF/XML parser.
  182.  */
  183. /**
  184.      * Set to <code>true</code> if the sink is read-only and cannot
  185.      * be modified
  186.      */
  187.   /* attribute boolean readOnly; */
  188.   NS_IMETHOD GetReadOnly(PRBool *aReadOnly) = 0;
  189.   NS_IMETHOD SetReadOnly(PRBool aReadOnly) = 0;
  190.  
  191.   /**
  192.      * Initiate the RDF/XML load.
  193.      */
  194.   /* void beginLoad (); */
  195.   NS_IMETHOD BeginLoad(void) = 0;
  196.  
  197.   /**
  198.      * Suspend the RDF/XML load.
  199.      */
  200.   /* void interrupt (); */
  201.   NS_IMETHOD Interrupt(void) = 0;
  202.  
  203.   /**
  204.      * Resume the RDF/XML load.
  205.      */
  206.   /* void resume (); */
  207.   NS_IMETHOD Resume(void) = 0;
  208.  
  209.   /**
  210.      * Complete the RDF/XML load.
  211.      */
  212.   /* void endLoad (); */
  213.   NS_IMETHOD EndLoad(void) = 0;
  214.  
  215.   /**
  216.      * Add namespace information to the RDF/XML sink.
  217.      * @param aPrefix the namespace prefix
  218.      * @param aURI the namespace URI
  219.      */
  220.   /* [noscript] void addNameSpace (in nsIAtomPtr aPrefix, [const] in nsStringRef aURI); */
  221.   NS_IMETHOD AddNameSpace(nsIAtom * aPrefix, const nsString & aURI) = 0;
  222.  
  223.   /**
  224.      * Add an observer that will be notified as the RDF/XML load
  225.      * progresses.
  226.      * <p>
  227.      *
  228.      * Note that the sink will acquire a strong reference to the
  229.      * observer, so care should be taken to avoid cyclical references
  230.      * that cannot be released (i.e., if the observer holds a
  231.      * reference to the sink, it should be sure that it eventually
  232.      * clears the reference).
  233.      *
  234.      * @param aObserver the observer to add to the sink's set of
  235.      * load observers.
  236.      */
  237.   /* void addXMLSinkObserver (in nsIRDFXMLSinkObserver aObserver); */
  238.   NS_IMETHOD AddXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver) = 0;
  239.  
  240.   /**
  241.      * Remove an observer from the sink's set of observers.
  242.      * @param aObserver the observer to remove.
  243.      */
  244.   /* void removeXMLSinkObserver (in nsIRDFXMLSinkObserver aObserver); */
  245.   NS_IMETHOD RemoveXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver) = 0;
  246.  
  247. };
  248.  
  249. /* Use this macro when declaring classes that implement this interface. */
  250. #define NS_DECL_NSIRDFXMLSINK \
  251.   NS_IMETHOD GetReadOnly(PRBool *aReadOnly); \
  252.   NS_IMETHOD SetReadOnly(PRBool aReadOnly); \
  253.   NS_IMETHOD BeginLoad(void); \
  254.   NS_IMETHOD Interrupt(void); \
  255.   NS_IMETHOD Resume(void); \
  256.   NS_IMETHOD EndLoad(void); \
  257.   NS_IMETHOD AddNameSpace(nsIAtom * aPrefix, const nsString & aURI); \
  258.   NS_IMETHOD AddXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver); \
  259.   NS_IMETHOD RemoveXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver); 
  260.  
  261. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  262. #define NS_FORWARD_NSIRDFXMLSINK(_to) \
  263.   NS_IMETHOD GetReadOnly(PRBool *aReadOnly) { return _to GetReadOnly(aReadOnly); } \
  264.   NS_IMETHOD SetReadOnly(PRBool aReadOnly) { return _to SetReadOnly(aReadOnly); } \
  265.   NS_IMETHOD BeginLoad(void) { return _to BeginLoad(); } \
  266.   NS_IMETHOD Interrupt(void) { return _to Interrupt(); } \
  267.   NS_IMETHOD Resume(void) { return _to Resume(); } \
  268.   NS_IMETHOD EndLoad(void) { return _to EndLoad(); } \
  269.   NS_IMETHOD AddNameSpace(nsIAtom * aPrefix, const nsString & aURI) { return _to AddNameSpace(aPrefix, aURI); } \
  270.   NS_IMETHOD AddXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver) { return _to AddXMLSinkObserver(aObserver); } \
  271.   NS_IMETHOD RemoveXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver) { return _to RemoveXMLSinkObserver(aObserver); } 
  272.  
  273. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  274. #define NS_FORWARD_SAFE_NSIRDFXMLSINK(_to) \
  275.   NS_IMETHOD GetReadOnly(PRBool *aReadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadOnly(aReadOnly); } \
  276.   NS_IMETHOD SetReadOnly(PRBool aReadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReadOnly(aReadOnly); } \
  277.   NS_IMETHOD BeginLoad(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginLoad(); } \
  278.   NS_IMETHOD Interrupt(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Interrupt(); } \
  279.   NS_IMETHOD Resume(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Resume(); } \
  280.   NS_IMETHOD EndLoad(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndLoad(); } \
  281.   NS_IMETHOD AddNameSpace(nsIAtom * aPrefix, const nsString & aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddNameSpace(aPrefix, aURI); } \
  282.   NS_IMETHOD AddXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddXMLSinkObserver(aObserver); } \
  283.   NS_IMETHOD RemoveXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveXMLSinkObserver(aObserver); } 
  284.  
  285. #if 0
  286. /* Use the code below as a template for the implementation class for this interface. */
  287.  
  288. /* Header file */
  289. class nsRDFXMLSink : public nsIRDFXMLSink
  290. {
  291. public:
  292.   NS_DECL_ISUPPORTS
  293.   NS_DECL_NSIRDFXMLSINK
  294.  
  295.   nsRDFXMLSink();
  296.  
  297. private:
  298.   ~nsRDFXMLSink();
  299.  
  300. protected:
  301.   /* additional members */
  302. };
  303.  
  304. /* Implementation file */
  305. NS_IMPL_ISUPPORTS1(nsRDFXMLSink, nsIRDFXMLSink)
  306.  
  307. nsRDFXMLSink::nsRDFXMLSink()
  308. {
  309.   /* member initializers and constructor code */
  310. }
  311.  
  312. nsRDFXMLSink::~nsRDFXMLSink()
  313. {
  314.   /* destructor code */
  315. }
  316.  
  317. /* attribute boolean readOnly; */
  318. NS_IMETHODIMP nsRDFXMLSink::GetReadOnly(PRBool *aReadOnly)
  319. {
  320.     return NS_ERROR_NOT_IMPLEMENTED;
  321. }
  322. NS_IMETHODIMP nsRDFXMLSink::SetReadOnly(PRBool aReadOnly)
  323. {
  324.     return NS_ERROR_NOT_IMPLEMENTED;
  325. }
  326.  
  327. /* void beginLoad (); */
  328. NS_IMETHODIMP nsRDFXMLSink::BeginLoad()
  329. {
  330.     return NS_ERROR_NOT_IMPLEMENTED;
  331. }
  332.  
  333. /* void interrupt (); */
  334. NS_IMETHODIMP nsRDFXMLSink::Interrupt()
  335. {
  336.     return NS_ERROR_NOT_IMPLEMENTED;
  337. }
  338.  
  339. /* void resume (); */
  340. NS_IMETHODIMP nsRDFXMLSink::Resume()
  341. {
  342.     return NS_ERROR_NOT_IMPLEMENTED;
  343. }
  344.  
  345. /* void endLoad (); */
  346. NS_IMETHODIMP nsRDFXMLSink::EndLoad()
  347. {
  348.     return NS_ERROR_NOT_IMPLEMENTED;
  349. }
  350.  
  351. /* [noscript] void addNameSpace (in nsIAtomPtr aPrefix, [const] in nsStringRef aURI); */
  352. NS_IMETHODIMP nsRDFXMLSink::AddNameSpace(nsIAtom * aPrefix, const nsString & aURI)
  353. {
  354.     return NS_ERROR_NOT_IMPLEMENTED;
  355. }
  356.  
  357. /* void addXMLSinkObserver (in nsIRDFXMLSinkObserver aObserver); */
  358. NS_IMETHODIMP nsRDFXMLSink::AddXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver)
  359. {
  360.     return NS_ERROR_NOT_IMPLEMENTED;
  361. }
  362.  
  363. /* void removeXMLSinkObserver (in nsIRDFXMLSinkObserver aObserver); */
  364. NS_IMETHODIMP nsRDFXMLSink::RemoveXMLSinkObserver(nsIRDFXMLSinkObserver *aObserver)
  365. {
  366.     return NS_ERROR_NOT_IMPLEMENTED;
  367. }
  368.  
  369. /* End of implementation class template. */
  370. #endif
  371.  
  372.  
  373. #endif /* __gen_nsIRDFXMLSink_h__ */
  374.